package com.wdl.modules.myhouse.service.oauth2;

import com.baomidou.mybatisplus.extension.service.IService;
import com.wdl.modules.myhouse.common.Result;
import com.wdl.modules.myhouse.entity.oauth2.Oauth2WeiboEntity;
import com.wdl.modules.myhouse.vo.UserVo;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author 昏昏的君
 */
public interface Oauth2WeiboService extends IService<Oauth2WeiboEntity> {
    /**
     * 根据微博uid 更新用户信息
     * @param weiboEntity
     */
    Boolean updateByWeiboUid(Oauth2WeiboEntity weiboEntity);

    /**
     * 微博登录成功回调
     * @param code
     * @param req
     * @param resp
     */
    Result<UserVo> weiboLoginSuccess(String code, HttpServletRequest req, HttpServletResponse resp) throws IOException;
}
